package com.aptech.domain.JPA;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * FaqId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class FaqId implements java.io.Serializable {

	// Fields

	private Integer faqId;
	private Integer accountId;

	// Constructors

	/** default constructor */
	public FaqId() {
	}

	/** full constructor */
	public FaqId(Integer faqId, Integer accountId) {
		this.faqId = faqId;
		this.accountId = accountId;
	}

	// Property accessors

	@Column(name = "FAQ_ID", nullable = false)
	public Integer getFaqId() {
		return this.faqId;
	}

	public void setFaqId(Integer faqId) {
		this.faqId = faqId;
	}

	@Column(name = "ACCOUNT_ID", nullable = false)
	public Integer getAccountId() {
		return this.accountId;
	}

	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FaqId))
			return false;
		FaqId castOther = (FaqId) other;

		return ((this.getFaqId() == castOther.getFaqId()) || (this.getFaqId() != null
				&& castOther.getFaqId() != null && this.getFaqId().equals(
				castOther.getFaqId())))
				&& ((this.getAccountId() == castOther.getAccountId()) || (this
						.getAccountId() != null
						&& castOther.getAccountId() != null && this
						.getAccountId().equals(castOther.getAccountId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getFaqId() == null ? 0 : this.getFaqId().hashCode());
		result = 37 * result
				+ (getAccountId() == null ? 0 : this.getAccountId().hashCode());
		return result;
	}

}